RWTH - Mindstorms NXT Toolbox

GetMotor

Reads the current motor set by SetMotor(). Raises an error if no motor was set

Contents

Syntax

number = GetMotor()

Description

number = GetMotor() returns the current motor number set by function SetMotor. The value number can be 0, 1 or 2.

Example

   SetMotor(MOTOR_B);
   number = GetMotor();

See also

SetMotor

Signature